package com.roamer.audition.common.service;

import com.roamer.audition.common.request.AuditionRecordDTO;
import com.roamer.audition.common.request.AuditionRecordPageQuery;
import com.roamer.audition.common.request.AuditionRecordSimpleDTO;
import com.roamer.audition.common.request.AuditionRecordSimpleQuery;
import com.roamer.audition.common.response.AuditionRecordDetailVO;
import com.roamer.audition.common.response.AuditionRecordVO;
import com.roamer.rest.exception.suppert.DataConflictException;
import com.roamer.rest.exception.suppert.DataNotFoundException;
import org.springframework.data.domain.Page;

import java.util.List;

/**
 * 面试计划 业务处理接口
 *
 * @author roamer
 * @version V1.0
 * @date 2019-08-20 22:59
 */
public interface AuditionRecordService {

    /**
     * 创建面试计划
     *
     * @param auditionRecordSimpleDTO 面试计划DTO
     *
     * @return {@code AuditionRecordVO}
     *
     * @throws DataNotFoundException 公司不存在
     * @throws DataConflictException 时间段内已存在面试计划
     */
    AuditionRecordVO createAuditionRecord(AuditionRecordSimpleDTO auditionRecordSimpleDTO)
            throws DataNotFoundException, DataConflictException;

    /**
     * 修改面试计划
     *
     * @param auditionRecordDTO 面试计划DTO
     *
     * @return {@code AuditionRecordVO}
     *
     * @throws DataNotFoundException 面试计划不存在
     */
    AuditionRecordVO updateAuditionRecord(AuditionRecordDTO auditionRecordDTO) throws DataNotFoundException;


    /**
     * 删除面试计划
     *
     * @param id 行程ID
     *
     * @throws DataNotFoundException 面试计划不存在
     */
    void deleteAuditionRecord(Long id) throws DataNotFoundException;

    /**
     * 获取面试计划
     *
     * @param id 面试计划ID
     *
     * @return {@code AuditionRecordVO}
     *
     * @throws DataNotFoundException 面试计划不存在
     */
    AuditionRecordVO getAuditionRecord(Long id) throws DataNotFoundException;

    /**
     * 分页查询
     *
     * @param auditionRecordPageQuery 分页查询参数
     *
     * @return {@code Page<AuditionRecordVO>}
     */
    Page<AuditionRecordVO> getAuditionRecordPage(AuditionRecordPageQuery auditionRecordPageQuery);

    /**
     * 查询面试计划详情列表
     *
     * @param auditionRecordSimpleQuery 查询参数
     *
     * @return {@code List<AuditionRecordDetailVO>}
     */
    List<AuditionRecordDetailVO> getAuditionRecordList(AuditionRecordSimpleQuery auditionRecordSimpleQuery);

    /**
     * 获取即将开始的面试
     *
     * @param minuteOffset 分钟偏移量
     *
     * @return {@code List<AuditionRecordDetailVO>}
     */
    List<AuditionRecordDetailVO> getNearAuditionList(int minuteOffset);
}
